package top.eggcode.system.modules.user.model;

import lombok.Data;
import top.eggcode.common.base.BaseEntity;

import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

/**
 * Title:
 * Description: TODO
 * Date: 2021/6/3 17:12
 *
 * @author JiaQi Ding
 * @version 1.0
 */
@Data
public class UserBiz extends BaseEntity {

    private String accountId;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 备注
     */
    private String remark;

    /* 基本资料 */

    /**
     * 最后登录时间
     */
    private LocalDateTime lastLoginTime;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机
     */
    private String mobile;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别
     */
    private String sex;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 介绍
     */
    private String description;

    /**
     *
     */
    private String username;

    /**
     *
     */
    private String password;

    /**
     *
     */
    private List<RoleEntity> roleList = new LinkedList<>();

    /**
     *
     */
    private Short status;

    /**
     * 权限码集合
     */
    private Set<String> powers = new HashSet<>();

    public void setAccountInfo(AccountEntity entity) {
        username = entity.getUsername();
        status = entity.getStatus();
    }

}
